Digital signal compression is widely used in many multimedia applications and devices. Digital signal compression using a coder/decoder (codec) allows streaming media, such as audio or video signals to be transmitted over the Internet or stored on compact discs. A number of different standards of digital video compression have emerged, including H.261, H.263; DV; MPEG-1, MPEG-2, MPEG-4, VC1; and AVC (H.264). These standards, as well as other video compression technologies, seek to efficiently represent a video picture frame by eliminating the spatial and temporal redundancies in the picture and among successive pictures. Through the use of such compression standards, video contents can be carried in highly compressed video bit streams, and thus efficiently stored in disks or transmitted over networks.
Before a video stream is displayed to a user, it must be decoded. Typically, a video decoder is expected to output decoded frames to an output frame buffer before the frame is needed for display. However, with a software decoder, the decoding delay of each frame is unpredictable and this may lead to a phenomenon known as display buffer underflow.
When a media player begins the process of displaying a video stream to a user, the video decoder fills up the output frame buffer with decoded frames of the video stream. Once the output buffer is full, the media player begins to display the decoded frames in the output buffer. At a certain point, the decoder may begin running at a slower rate than the display due to the unpredictability of the decoding delay. The number of decoded frames in the output frame buffer begins to decrease as the media player begins to display decoded frames at a faster rate than the video decoder can decode video frames. This is known as display buffer underflow. If the video decoder remains running at a slower rate than the display rate of the media player, the media player will eventually run out of decoded frames in the output frame buffer to display. As a result, the user will notice that the video stream becomes frozen.
Currently many software video decoders are capable of handling display buffer underflow. However, these display buffer underflow handling mechanisms do not take place until underflow is actually recognized by the video decoder.
Compensation of the underflow of decoded frames in the output frame buffer usually involves increasing the rate at which the incoming video stream frames are decoded, but compensation at this point of detection usually leads to video quality degradation.
It is within this context that embodiments of the present invention arise.